<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[%$softtitle%]</title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<link href="templates/css/formdiv.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" src="js/cityselect.js"></script>
<script type="text/javascript" language="JavaScript">
	var enquirymain_search_js_searchkey_err  = "[%$ST.enquirymain_search_js_searchkey_err%]";
	var iframename = "[%$iframename%]";
	$(document).ready(function(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
		var options = {
			beforeSubmit: formverify,
			success:function(){
				return false;
			}
		}
		$('#enquirysearch').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})

	function formverify(formData, jqForm, options) {
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		if(get['searchkey']=='' || get['searchkey'].match(/[\'\"\<\>\,\;\^\$\(\)\!\.]+/ig)!=null) {
			document.enquirysearch.searchkey.focus();
			alert(enquirymain_search_js_searchkey_err);
			return false;
		}
		var esarchurl="index.php?archive=enquirymain&action=list&isclass="+get['isclass']+"&country="+get['cityone']+"&province="+get['citytwo']+"&city="+get['citythree']+"&district="+get['district']
			+"&limitkey=&limitclass=&keyname="+get['keyname']+"&serchekey="+encodeURI(get['searchkey']);
		parent.frames[iframename].search(esarchurl)
		parent.closeifram();
		return false;
	}
</script>
</head>

<body class="bodyflow">
<form name="enquirysearch" id="enquirysearch" method="post" action="#body">
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">[%$ST.position_title%]</span><span class="padding-left5 colorgorningage">[%$ST.enquirymain_search_title%]</span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtablewin">
					<tr class="trstyle2">
						<td class="trtitle01">[%$ST.enquirymain_search_keyword%]</td>
						<td  class="trtitle02"><input type="text" name="searchkey" size="30" maxlength="30" class="infoInput"/></td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">[%$ST.enquirymain_search_keyname%]</td>
						<td class="trtitle02">
							<select name="keyname" id="keyname">
								<option selected value="enquirysn">[%$ST.enquirymain_search_keyname1%]</option>
								<option value="linkman">[%$ST.enquirymain_search_keyname2%]</option>
								<option value="tel">[%$ST.enquirymain_search_keyname3%]</option>
								<option value="mobile">[%$ST.enquirymain_search_keyname4%]</option>
								<option value="email">[%$ST.enquirymain_search_keyname5%]</option>
							</select>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">[%$ST.enquirymain_text_isclass%]</td>
						<td  class="trtitle02">
							<select size="1" name="isclass" id="isclass">
								<option selected value="0">[%$ST.all_botton%]</option>
								<option value="1">[%$ST.enquirymain_text_isclass1%]</option>
								<option value="2">[%$ST.enquirymain_text_isclass2%]</option>
								<option value="3">[%$ST.enquirymain_text_isclass3%]</option>
							</select>
						</td>
					</tr>
					<tr class="trstyle2" id="select4">
						<td class="trtitle01">[%$ST.enquirymain_add_country%]</td>
						<td class="trtitle02">
							<select size="1" name="cityone" class="select" id="cityone">
								<option value="0">[%$ST.enquirymain_add_country_option%]</option>
								<option value="1">[%$ST.enquirymain_add_country_value%]</option>
							</select>
							<select size="1" name="citytwo" class="select" id="citytwo">
								<option value="0">[%$ST.enquirymain_add_province_option%]</option>
							</select>
							<select size="1" name="citythree" class="select" id="citythree">
								<option value="0">[%$ST.enquirymain_add_city_option%]</option>
							</select>
							<select size="1" name="district" class="select" id="district">
								<option value="0">[%$ST.enquirymain_add_district_option%]</option>
							</select>
							<span id="cityloading">Loading…</span>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table border="0" width="100%">
			<tr id="bottonsubmit">
				<td id="right"><input type="submit" name="Submit" id="submitbotton" value="[%$ST.botton_search%]" class="button orange" title="[%$ST.botton_search%]"/></td>
				<td id="left" class="padding-left5"><input type="reset" name="reset" onClick="javascript:parent.closeifram();" id="release" value="[%$ST.botton_search_reset%]" class="button orange"  title="[%$ST.botton_search_reset%]" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>
</html>      